struct DataPacket
{
	BYTE mType;			// +00 Packet Type
	BYTE mFunc;			// +02 Function to Call
	BYTE mSize;			// +04 Size of the Packet
	DWORD mReserved;	// +06 Used with items
	BYTE mUnitType;		// +0A Always '0'
	DWORD mPlayerID;	// +0C The Player ID (ptUnit + 08h)
	DWORD mItemID;		// +10 The Item ID
	DWORD mMod1_ID;		// +14 The Stat/Mod ID
	DWORD mParam1;		// +18 3 Paramters
	DWORD mParam2;		// +1C
	DWORD mParam3;		// +20
};

enum 
{
	PACKET_CLIENTJOIN = 0x00,
	PACKET_GAMEDATA = 0x01,		//S -> C
	PACKET_GAMEREADY = 0x02,
	PACKET_PLAYERMOVE = 0x03,		//C -> S
	PACKET_GAMEINIT = 0x03,		//S -> C
	PACKET_CLIENTSTATUS = 0x04,
	PACKET_GAMEEND = 0x05,		//S -> C
	PACKET_DEATHMESSAGE = 0x06,		//S -> C
	PACKET_INFERNOSTATEOFF = 0x06,		//C -> S
	PACKET_INITROOM = 0x07,
	PACKET_REVEALROOM = 0x08,
	PACKET_DELETEUNIT = 0x0A,		//S -> C
	PACKET_SETPLAYERLOAD = 0x0B,
	PACKET_UNUSED_C = 0x0C,
	PACKET_CASTSKILL = 0x0C,
	PACKET_UNUSED_E = 0x0E,
	PACKET_OBJECTSTATE = 0x0E,
	PACKET_SYSTEMMSG = 0x0D,
	PACKET_SERVER_CHAT = 0x0F,
	PACKET_UNUSED_10 = 0x10,		//S -> C
	PACKET_TOGGLESTATEOFF = 0x11,		//S -> C
	PACKET_UNUSED_12 = 0x12,		//S -> C
	PACKET_MELEEATTACK = 0x12,		//C -> S
	PACKET_UNITINTERACT = 0x13,		//C -> S
	PACKET_UNUSED_13 = 0x13,		//S -> C
	PACKET_EMOTE = 0x14,		//C -> S
	PACKET_UNUSED_14 = 0x14,		//S -> C
	PACKET_CHAT = 0x15,		//C -> S
	PACKET_UNK_15 = 0x15,		//S -> C
	PACKET_UNK_16 = 0x16,		//S -> C
	PACKET_PICKUPINVITEM = 0x16,		//C -> S
	PACKET_DROPITEM = 0x17,		//C -> S
	PACKET_GOLD_8 = 0x19,
	PACKET_EXP_8 = 0x1A,
	PACKET_EXP_16 = 0x1B,
	PACKET_EXP_32 = 0x1C,
	PACKET_STAT_8 = 0x1D,
	PACKET_STAT_16 = 0x1E,
	PACKET_STAT_32 = 0x1F,
	PACKET_STAT_32_PLAY = 0x20,
	PACKET_USEITEM = 0x20,
	PACKET_SKILLUPDATE = 0x21,		//S -> C
	PACKET_SCROLL = 0x22,		//S -> C
	PACKET_SETACTIVESKILL = 0x23,		//S -> C
	PACKET_CHAT_RELAY = 0x26,
	PACKET_USE_BELT_ITEM = 0x26,
	PACKET_PSPELLTARGET = 0x27,		//C -> S
	PACKET_SCROLLMESSAGE = 0x27,		//S -> C
	PACKET_SOCKETITEM = 0x28,		//C -> S
	PACKET_PLAYERQUESTS = 0x28,		//S -> C
	PACKET_PLAYERQUESTSEX = 0x29,
	PACKET_ADD_ITEM_STACK = 0x29,
	PACKET_FAILDIALOG = 0x2A,
	PACKET_CLIENTUPDATE = 0x2C,
	PACKET_NPCUPDATE = 0x30,
	PACKET_CLOSE_ANVIL = 0x30,
	PACKET_NPCMESSAGE = 0x31,		//C -> S
	PACKET_BUY = 0x32,
	PACKET_SELL = 0x33,
	PACKET_IDENTIFY = 0x34,
	PACKET_REPAIRALL = 0x35,
	PACKET_NPCMSG = 0x38,		//C -> S
	PACKET_BUYLIFE = 0x39,
	PACKET_ADDSTAT = 0x3A,
	PACKET_ADDSKILL = 0x3B,
	PACKET_SKILLSELECT = 0x3C,
	PACKET_BARKSCROLL = 0x3E,		//C -> S
	PACKET_ITEMUPDATE = 0x3E,		//S -> C
	PACKET_CURSOR = 0x3F,		//S -> C
	PACKET_RESPAWN = 0x41,
	PACKET_DELETECURSORITEM = 0x42,		//S -> C
	PACKET_CLOSE_ANVIL_EX = 0x44,
	PACKET_UPDATEUNIT = 0x47,
	PACKET_UPDATEEQUIPMENT = 0x48,		//S -> C
	PACKET_WAYPOINT_CLOSE = 0x49,
	PACKET_USETMOGITEM = 0x4C,		//C -> S
	PACKET_UNUSED_4D = 0x4D,
	PACKET_NPC_SOUND = 0x4D,
	PACKET_MERCLIST = 0x4E,		//S -> C
	PACKET_MERCINIT = 0x4F,		//S -> C
	PACKET_UIDISABLE = 0x4F,		//C - > S
	PACKET_QUESTLOGEXTRA = 0x50,
	PACKET_SETHOTKEY = 0x51,		//C -> S
	PACKET_NEWOBJECT = 0x51,		//S -> C
	PACKET_QUESTSTATUS = 0x52,
	PACKET_GAMETIME = 0x53,		//S -> C
	PACKET_NPCITEMEVENT = 0x58,
	PACKET_NEWPLAYER = 0x59,
	PACKET_SERVER_MESSAGE = 0x5A,
	PACKET_PLAYERJOIN = 0x5B,
	PACKET_QUESTLOG = 0x5D,		//S -> C
	PACKET_HOSTILE = 0x5D,		//C -> S
	PACKET_INIT_QUESTS = 0x5E,
	PACKET_WAYPOINTSMASK = 0x5F,		//S -> C
	PACKET_PORTAL = 0x60,
	PACKET_ACTCHANGE = 0x61,
	PACKET_REMOVEINTERACT = 0x62,
	PACKET_WAYPOINT_OPEN = 0x63,
	PACKET_ARENASCORE = 0x65,
	PACKET_CREATEGAME = 0x66,		//C -> S
	PACKET_JOINGAME = 0x67,		//C -> S
	PACKET_ENDGAME = 0x68,		//C -> S
	PACKET_UNUSED_69 = 0x69,
	PACKET_JOINLIST = 0x69,		//C -> S
	PACKET_JOINACT = 0x6A,		//C -> S
	PACKET_OPENCHAR = 0x6B,		//C -> S
	PACKET_UNUSED_6D = 0x6D,
	PACKET_FORCEDISCONNECT = 0x6D,		//C -> S
	PACKET_CREATEMISSILE = 0x73,		//S -> C
	PACKET_PLAYERINFO = 0x75,
	PACKET_FREEHOVER = 0x76,
	PACKET_PETUPDATE = 0x7A,		//S -> C
	PACKET_UITOGGLE = 0x77,
	PACKET_HOTKEY = 0x7B,		//S -> C
	PACKET_PSPELLFAIL = 0x7C,		//S -> C
	PACKET_PETADDEXTRA = 0x81,		//S -> C
	PACKET_TRIGGERFX = 0x89,
	PACKET_SPEECHBALLOON = 0x8A,
	PACKET_PARTYLEAVE = 0x8D,		//S -> C
	PACKET_CORPSE = 0x8E,		//S -> C
	PACKET_NPCINTRO = 0x91,
	PACKET_SKILLINFO = 0x94,
	PACKET_ATTACK = 0x95,
	PACKET_WEAPONSWAP = 0x97,		//S -> C
	PACKET_SKILLVSTARGET = 0x99,		//S -> C
	PACKET_SKILLVSPOS = 0x9A,		//S -> C
	PACKET_MERCCOST = 0x9B,		//S -> C
	PACKET_NEWITEM = 0x9C,
	PACKET_ITEMACTION = 0x9D,
	PACKET_STAT_8_MON = 0x9E,
	PACKET_STAT_16_MON = 0x9F,
	PACKET_STAT_32_MON = 0xA0,
	PACKET_STAT_8_MON_ADD = 0xA1,
	PACKET_STAT_16_MON_ADD = 0xA2,
	PACKET_GFXLOAD = 0xA4,		//S -> C
	PACKET_ITEMTABLES = 0xA6,
	PACKET_STATEON = 0xA7,		//S -> C
	PACKET_STATEUPDATE = 0xA8,		//S -> C
	PACKET_STATEOFF = 0xA9,		//S -> C
	PACKET_STATEADD = 0xAA,		//S -> C
	PACKET_HP_PERCENT = 0xAB,		//S -> C
	PACKET_NEWMONSTER = 0xAC,
	PACKET_GAMEOPEN = 0xAE,
	PACKET_GAMECLOSE = 0xAF,
	PACKET_JOINLISTITEM = 0xB1,		//S -> C
	PACKET_SAVEFILE = 0xB2,
	PACKET_SAVEFILESTATUS = 0xB3,		//S -> C
};

struct D2GSPacketSrv26		//variable size
{
	BYTE nHeader;			//0x00
	BYTE nMessageType;		//0x01
	BYTE Unk1;				//Unknown 0x02
	BYTE Unk2;				//0x09
	DWORD Unk2_0;			//0x04 0
	BYTE nMessageColor;		//0x08
	BYTE nNameColor;		//0x09
	char szStrings[502];	//0x0A
	//[WORD Unknown(0x02)]  00 00 00 00[BYTE 0x05 = Normal Chat || 0x01 = Whisper][Char Name] 00[Message] 00
};

enum D2C_ChatMessageTypes
{
	CHAT_NONE,
	CHAT_PLAYERMESSAGE,
	CHAT_RECEIVEDWHISPER,
	CHAT_UNUSED,
	CHAT_MESSAGE,
	CHAT_EMOTE,
	CHAT_SENTWHISPER,
	CHAT_CLUESCROLL,
};

struct SRV2CLTPACKET95
{
	BYTE bHeader;
	WORD wLife;
	WORD wMana;
	WORD wStamina;
	WORD wOffsetX;
	WORD wOffsetY;
	BYTE bTargetXOffset;
	BYTE bTargetYOffset;
};
